import request from '@/utils/request'
import qs from 'qs'

export function getBook(data) {
    return request({
        url: `/api/book/list?${qs.stringify(data)}`,
        method: "get"
    })
}

export function deleteBook(data) {    
    return request({
        url: `/api/book/delete/${data}`,
        method: 'delete'
    })
}

export function saveBook(data) {
    return request({
        url: '/api/book/save',
        method: 'post',
        data
    })
}

export function updateBook(data) {
    return request({
        url: 'api/book/update',
        method: 'put',
        data
    })
}